import React, { Component } from 'react'

export default class ClassSon extends Component {
    render() {
        console.log('-----------')
        return (
            <div>
                <h3>ClassSon</h3>
                <p>App count: {this.props.count}</p>
                <button onClick={() => this.props.getAge(99)}>传数据</button>
                <button onClick={()=>{
                    this.props.count += 1 // props数据是只读属性不可修改
                }}>直接修改props数据</button>

                <button>在子组件中修改父组件中的数据count</button>
            </div>
        )
    }
}
